#ifndef _MGALLERY_H_
#define _MGALLERY_H_

#include "AEE.h"
#include "AEERootForm.h"
#include "AEEModel.h"
#include "AEEPTLayer.h"
#include "dfon_aee_ext_sound.h"
#include "AEEFile.h"
#include "AEEVectorModel.h"
#include "dfon_aee_ext_utility.h"

typedef struct AssignCtx AssignCtx;
typedef struct RenameCtx RenameCtx;

typedef enum 
{
	MGalleryModeNormal = 0,
	MGalleryModeChooseSound,
	MGalleryModeChooseImage,
} MGalleryMode ;

typedef struct MGallery 
{
	IShell *shell;
	IRootForm *rf;
	ISoundLib *sndLib;
	IPTLayer *ptl;
	IUtilLib *utils;

	MGalleryMode mode;
	char *outFileName;
	uint32 *outValue;

	AssignCtx *assign;
	RenameCtx *rename;

	ModelListener rfListener;
	char resFileName[AEE_MAX_FILE_NAME];

	//some everywhere used images
	IVectorModel *numberImages;
	IImage *leftArrow;
	IImage *rightArrow;

} MGallery ;

MGallery* MGallery_Create(IShell *shell);
boolean MGallery_OnStart(MGallery *me, AEEAppStart *appStart);
boolean MGallery_HandleEvent(MGallery *me, AEEEvent evt, uint16 wParam, uint32 dwParam);
void MGallery_Destroy(MGallery *me);

#endif //_MGALLERY_H_